home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / syscall / RCS / Ioc_GetOwner.c,v < prev    next >
Encoding:
Text File  |  1991-12-09  |  2.3 KB  |  116 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  sprited:1.2.1;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     88.07.29.18.43.23;  author ouster;  state Exp;
  11. branches 1.2.1.1;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     88.06.19.14.29.18;  author ouster;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19. 1.2.1.1
  20. date     91.12.08.16.48.39;  author kupfer;  state Exp;
  21. branches ;
  22. next     ;
  23.  
  24.  
  25. desc
  26. @@
  27.  
  28.  
  29. 1.2
  30. log
  31. @Use "int" instead of "Proc_PID".
  32. @
  33. text
  34. @/* 
  35.  * Ioc_GetOwner.c --
  36.  *
  37.  *    Source code for the Ioc_GetOwner library procedure.
  38.  *
  39.  * Copyright 1988 Regents of the University of California
  40.  * Permission to use, copy, modify, and distribute this
  41.  * software and its documentation for any purpose and without
  42.  * fee is hereby granted, provided that the above copyright
  43.  * notice appear in all copies.  The University of California
  44.  * makes no representations about the suitability of this
  45.  * software for any purpose.  It is provided "as is" without
  46.  * express or implied warranty.
  47.  */
  48.  
  49. #ifndef lint
  50. static char rcsid[] = "$Header: Ioc_GetOwner.c,v 1.1 88/06/19 14:29:18 ouster Exp $ SPRITE (Berkeley)";
  51. #endif not lint
  52.  
  53. #include <sprite.h>
  54. #include <fs.h>
  55.  
  56.  
  57. /*
  58.  *----------------------------------------------------------------------
  59.  *
  60.  * Ioc_GetOwner --
  61.  *    Return the ID or the process or group that is currently
  62.  *    associated (owns) the device.
  63.  *
  64.  * Results:
  65.  *    *idPtr is set to the ID, and *procOrFamilyPtr is set to
  66.  *    either IOC_OWNER_FAMILY if the ID is a process family ID,
  67.  *    or to IOC_OWNER_PROC if the ID is of one process.
  68.  *
  69.  * Side effects:
  70.  *    None.
  71.  *
  72.  *----------------------------------------------------------------------
  73.  */
  74.  
  75. ReturnStatus
  76. Ioc_GetOwner(streamID, idPtr, procOrFamilyPtr)
  77.     int streamID;
  78.     int *idPtr;
  79.     int *procOrFamilyPtr;
  80. {
  81.     register ReturnStatus status;
  82.     Ioc_Owner owner;
  83.  
  84.     status = Fs_IOControl(streamID, IOC_GET_OWNER, 0,
  85.             (Address)NULL, sizeof(Ioc_Owner), (Address)&owner);
  86.     *idPtr = owner.id;
  87.     *procOrFamilyPtr = owner.procOrFamily;
  88.     return(status);
  89. }
  90. @
  91.  
  92.  
  93. 1.2.1.1
  94. log
  95. @Initial branch for Sprite server.
  96. @
  97. text
  98. @d17 1
  99. a17 1
  100. static char rcsid[] = "$Header: /sprite/src/lib/c/syscall/RCS/Ioc_GetOwner.c,v 1.2 88/07/29 18:43:23 ouster Exp $ SPRITE (Berkeley)";
  101. @
  102.  
  103.  
  104. 1.1
  105. log
  106. @Initial revision
  107. @
  108. text
  109. @d17 1
  110. a17 1
  111. static char rcsid[] = "$Header: proto.c,v 1.2 88/03/11 08:39:08 ouster Exp $ SPRITE (Berkeley)";
  112. d45 1
  113. a45 1
  114.     Proc_PID *idPtr;
  115. @
  116.